package com.example.my_music_palyer.mapper;

import com.example.my_music_palyer.model.Music;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MusicMapper {
    int insert(@Param("title") String title, @Param("singer") String singer
            , @Param("time") String time,@Param("url")  String url,@Param("userid")  int userid);

    Music isSymple(@Param("title")String title, @Param("singer")String singer);

    Music findMusicById(@Param("id") int id);

    int deleteMusicById(@Param("id") int id);

    List<Music> findMusicByMusicName(@Param("musicName") String musicName);

    List<Music> findMusic();

}
